﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TileEditor
{
    // Tile Structure
    // Used to hold data that world editor will need to transfer to the game
    public struct Tile
    {
        // X Position
        int x;

        public int X
        {
            get { return x; }
            set { x = value; }
        }
       
        // Y Position
        int y;

        public int Y
        {
            get { return y; }
            set { y = value; }
        }

        // Used to get render rectangle
        int tileID;

        public int TileID
        {
            get { return tileID; }
            set { tileID = value; }
        }

        // Used to get image to draw
        int setID;

        public int SetID
        {
            get { return setID; }
            set { setID = value; }
        }

        // 0 if cannot be passed, 1 if can be passed through
        int passable;

        public int Passable
        {
            get { return passable; }
            set { passable = value; }
        }

        // Group this tile will trigger, -1 if not a trigger
        int triggerGroup;

        public int TriggerGroup
        {
            get { return triggerGroup; }
            set { triggerGroup = value; }
        }

        public Tile( int x, int y, int tileID, int nSetID, int pass, int trigger)
        {
            x = new int();
            this.x = x;

            y = new int();
            this.y = y;

            tileID = new int();
            this.tileID = tileID;

            setID = new int();
            this.setID = nSetID;

            passable = new int();
            this.passable = pass;

            triggerGroup = new int();
            this.triggerGroup = trigger;
        }
    }
}
